home *** CD-ROM | disk | FTP | other *** search
- global gTitleList, gTitleID, gTitlePicList, gTitleObj, gNbItemC, gPicListC, gPicListAllC, gPicLabelIDC, gPicPeteOffsetC, gContenuPicObj, gPicMovieNumC
-
- on FindTitles pos
- watchCursor()
- set MaxLengthLine to 2275
- set gTitleList to []
- set gTitleID to []
- set gTitlePicList to []
- setAt(gNbItemC, 2, 0)
- set the visible of sprite 18 to 0
- gTitleObj(mSetPosition, (pos - 1) * (MaxLengthLine + 1))
- set TermLine to gTitleObj(mReadLine)
- set the itemDelimiter to "Ð"
- set numberofTitle to the number of items in TermLine / 3
- set i to 0
- repeat while i < numberofTitle
- set the text of cast 10100 to " " & string(i * 100 / numberofTitle) & "%"
- add(gTitleList, item 1 of TermLine)
- delete item 1 of TermLine
- add(gTitleID, item 1 of TermLine)
- delete item 1 of TermLine
- add(gTitlePicList, value(item 1 of TermLine))
- delete item 1 of TermLine
- set i to i + 1
- end repeat
- set the itemDelimiter to ","
- setAt(gNbItemC, 2, count(gTitleList))
- ClearCursor()
- end
-
- on FindPicsC TermPos
- watchCursor()
- set gPicListC to []
- set gPicListAllC to []
- set gPicLabelIDC to []
- set gPicPeteOffsetC to []
- set gPicMovieNumC to []
- setAt(gNbItemC, 3, 0)
- set ListPicTemp to [:]
- set the visible of sprite 25 to 0
- set NbPic to count(getAt(gTitlePicList, TermPos))
- set the itemDelimiter to "Ð"
- if NbPic > 5 then
- repeat with i = 1 to NbPic
- set the text of cast 10101 to " " & string(i * 100 / NbPic) & "%"
- set PicFilePos to getAt(getAt(gTitlePicList, TermPos), i)
- gContenuPicObj(mSetPosition, PicFilePos)
- set PicLine to gContenuPicObj(mReadLine)
- set listtmp to []
- add(listtmp, item 1 of PicLine)
- delete item 1 of PicLine
- add(listtmp, value(item 1 of PicLine))
- delete item 1 of PicLine
- add(listtmp, value(item 1 of PicLine))
- delete item 1 of PicLine
- add(listtmp, value(item 1 of PicLine))
- delete item 1 of PicLine
- addProp(ListPicTemp, getAt(listtmp, 1), listtmp)
- end repeat
- else
- repeat with i = 1 to NbPic
- set PicFilePos to getAt(getAt(gTitlePicList, TermPos), i)
- gContenuPicObj(mSetPosition, PicFilePos)
- set PicLine to gContenuPicObj(mReadLine)
- set listtmp to []
- add(listtmp, item 1 of PicLine)
- delete item 1 of PicLine
- add(listtmp, value(item 1 of PicLine))
- delete item 1 of PicLine
- add(listtmp, value(item 1 of PicLine))
- delete item 1 of PicLine
- add(listtmp, value(item 1 of PicLine))
- delete item 1 of PicLine
- addProp(ListPicTemp, getAt(listtmp, 1), listtmp)
- end repeat
- end if
- set the itemDelimiter to ","
- repeat with i = 1 to count(ListPicTemp)
- set thePic to getAt(getAt(ListPicTemp, i), 1)
- set thePicTemp to thePic
- set posOmega to offset("@", thePic)
- if posOmega > 0 then
- set thePic to chars(thePic, 1, posOmega - 1) & ": " & chars(thePic, posOmega + 1, length(thePic))
- end if
- set posTruncMark to offset("…", thePic)
- set posParenthese to offset("((", thePic)
- if posTruncMark > 0 then
- if posParenthese > 0 then
- set thePic to chars(thePic, 1, posParenthese + 3)
- set thePic to chars(thePic, 1, posParenthese - 1) & chars(thePic, posParenthese + 1, length(thePic))
- set thePicTemp to chars(thePicTemp, 1, posTruncMark - 1) & chars(thePicTemp, posParenthese + 4, length(thePicTemp))
- else
- set thePic to chars(thePic, 1, posTruncMark)
- set thePicTemp to chars(thePicTemp, 1, posTruncMark - 1) & chars(thePicTemp, posTruncMark + 1, length(thePicTemp))
- end if
- else
- if posParenthese > 0 then
- set thePic to chars(thePic, 1, posParenthese - 1) & chars(thePic, posParenthese + 1, length(thePic))
- set thePicTemp to chars(thePicTemp, 1, posParenthese - 2)
- end if
- end if
- add(gPicListC, thePic)
- add(gPicListAllC, thePicTemp)
- add(gPicLabelIDC, getAt(getAt(ListPicTemp, i), 2))
- add(gPicPeteOffsetC, getAt(getAt(ListPicTemp, i), 3))
- add(gPicMovieNumC, getAt(getAt(ListPicTemp, i), 4))
- end repeat
- setAt(gNbItemC, 3, count(gPicListC))
- ClearCursor()
- end
-